﻿using System;

namespace Dora.Orm.Core.Domain.Entities.Auditing
{
    /// <summary>
    /// 审计抽象
    /// </summary>
    /// <typeparam name="TTPrimaryKey">主键</typeparam>
    public abstract class TimeAuditedEntity<TTPrimaryKey> : Entity<TTPrimaryKey>, IHasCreationTime,
        IHasModificationTime
    {
        protected TimeAuditedEntity()
        {
            CreatedTime = DateTime.Now;
        }
        public DateTime? CreatedTime { get; set; }
        public virtual DateTime? UpdatedTime { get; set; }
    }
}
